<%@page import="kr.ac.chungbuk.service.PageTO"%>
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<%
	PageTO to = (PageTO) request.getAttribute("page");
	int totalPage = to.getTotalCount() / to.getPerPage();

	if (to.getTotalCount() % to.getPerPage() != 0)
		totalPage += 1;

	for (int i = 1; i <= totalPage; i++) {
		if (to.getCurPage() == i)
			out.print("<font size=5 color='red'>" + i + "</font> ");
		else
			out.print("<a href='list.do?curPage=" + i + "'>" + i
					+ "</a> ");
	}
%>